<template>
  <div class="about">
    <h1>This is an about dage</h1>
    {{ getUsername }}
    {{ $store.getters.username }}
    <button @click="superman">变身成超人</button>
  </div>
</template>
<script>
import { mapGetters, mapState, mapMutations } from "vuex";
export default {
  name: "about",
  data() {
    return {
      user: ""
    };
  },
  computed: {
    ...mapState(["username"]),
    ...mapGetters(["getUsername", "getAuth"])
  },
  methods: {
    ...mapMutations(["setUsername"]),
    superman() {
      this.setUsername("superman");
    }
  },
  created() {}
};
</script>
